﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JqueryNet.FormControl.FormHtmlControl
{
    public class JHtmlMeta : JHtmlControl
    {
        private System.Web.UI.HtmlControls.HtmlMeta htmlMeta;

        public JHtmlMeta(System.Web.UI.HtmlControls.HtmlMeta htmlMeta):base(htmlMeta)
        {
            // TODO: Complete member initialization
            this.htmlMeta = htmlMeta;
        }

        public override void Attr(string key)
        {
            switch (key.ToLower())
            {
                case "content":
                    Value = htmlMeta.Content;
                    return;
                case "httpequiv":
                    Value = htmlMeta.HttpEquiv;
                    return;
                case "scheme":
                    Value = htmlMeta.Scheme; return; 
                default: base.Attr(key);
                    return;
            }
        }

        public override void Attr(string key, string value)
        { 
            switch (key.ToLower())
            {
                case "content":
                    htmlMeta.Content = value;
                    return;
                case "httpequiv":
                    htmlMeta.HttpEquiv = value;
                    return;
                case "scheme":
                    htmlMeta.Scheme = value; return;
                default: base.Attr(key);
                    return;
            }
        }    
    }
}
